3.282 \(\int \frac{a x^m+b x^n}{c x^m+d x^n} \, dx\)

Optimal. Leaf size=54 \[ \frac{x (b c-a d) \, _2F_1\left (1,\frac{1}{m-n};1+\frac{1}{m-n};-\frac{c x^{m-n}}{d}\right )}{c d}+\frac{a x}{c} \]

[Out]

(a*x)/c + ((b*c - a*d)*x*Hypergeometric2F1[1, (m - n)^(-1), 1 + (m - n)^(-1), -((c*x^(m - n))/d)])/(c*d)

________________________________________________________________________________________

Rubi [A]  time = 0.0497989, antiderivative size = 54, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 25, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.16, Rules used = {1593, 1584, 388, 245} \[ \frac{x (b c-a d) \, _2F_1\left (1,\frac{1}{m-n};1+\frac{1}{m-n};-\frac{c x^{m-n}}{d}\right )}{c d}+\frac{a x}{c} \]

Antiderivative was successfully verified.

[In]

Int[(a*x^m + b*x^n)/(c*x^m + d*x^n),x]

[Out]

(a*x)/c + ((b*c - a*d)*x*Hypergeometric2F1[1, (m - n)^(-1), 1 + (m - n)^(-1), -((c*x^(m - n))/d)])/(c*d)

Rule 1593

Int[(u_.)*((a_.)*(x_)^(p_.) + (b_.)*(x_)^(q_.))^(n_.), x_Symbol] :> Int[u*x^(n*p)*(a + b*x^(q - p))^n, x] /; F
reeQ[{a, b, p, q}, x] && IntegerQ[n] && PosQ[q - p]

Rule 1584

Int[(u_.)*(x_)^(m_.)*((a_.)*(x_)^(p_.) + (b_.)*(x_)^(q_.))^(n_.), x_Symbol] :> Int[u*x^(m + n*p)*(a + b*x^(q -
 p))^n, x] /; FreeQ[{a, b, m, p, q}, x] && IntegerQ[n] && PosQ[q - p]

Rule 388

Int[((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_)), x_Symbol] :> Simp[(d*x*(a + b*x^n)^(p + 1))/(b*(n*
(p + 1) + 1)), x] - Dist[(a*d - b*c*(n*(p + 1) + 1))/(b*(n*(p + 1) + 1)), Int[(a + b*x^n)^p, x], x] /; FreeQ[{
a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && NeQ[n*(p + 1) + 1, 0]

Rule 245

Int[((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[a^p*x*Hypergeometric2F1[-p, 1/n, 1/n + 1, -((b*x^n)/a)],
x] /; FreeQ[{a, b, n, p}, x] &&  !IGtQ[p, 0] &&  !IntegerQ[1/n] &&  !ILtQ[Simplify[1/n + p], 0] && (IntegerQ[p
] || GtQ[a, 0])

Rubi steps

\begin{align*} \int \frac{a x^m+b x^n}{c x^m+d x^n} \, dx &=\int \frac{x^n \left (b+a x^{m-n}\right )}{c x^m+d x^n} \, dx\\ &=\int \frac{b+a x^{m-n}}{d+c x^{m-n}} \, dx\\ &=\frac{a x}{c}-\frac{(-b c+a d) \int \frac{1}{d+c x^{m-n}} \, dx}{c}\\ &=\frac{a x}{c}+\frac{(b c-a d) x \, _2F_1\left (1,\frac{1}{m-n};1+\frac{1}{m-n};-\frac{c x^{m-n}}{d}\right )}{c d}\\ \end{align*}

Mathematica [A]  time = 0.0192134, size = 52, normalized size = 0.96 \[ \frac{x \left ((b c-a d) \, _2F_1\left (1,\frac{1}{m-n};1+\frac{1}{m-n};-\frac{c x^{m-n}}{d}\right )+a d\right )}{c d} \]

Antiderivative was successfully verified.

[In]

Integrate[(a*x^m + b*x^n)/(c*x^m + d*x^n),x]

[Out]

(x*(a*d + (b*c - a*d)*Hypergeometric2F1[1, (m - n)^(-1), 1 + (m - n)^(-1), -((c*x^(m - n))/d)]))/(c*d)

________________________________________________________________________________________

Maple [F]  time = 0.767, size = 0, normalized size = 0. \begin{align*} \int{\frac{a{x}^{m}+b{x}^{n}}{c{x}^{m}+d{x}^{n}}}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a*x^m+b*x^n)/(c*x^m+d*x^n),x)

[Out]

int((a*x^m+b*x^n)/(c*x^m+d*x^n),x)

________________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \begin{align*} -{\left (b c - a d\right )} \int \frac{x^{m}}{c d x^{m} + d^{2} x^{n}}\,{d x} + \frac{b x}{d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a*x^m+b*x^n)/(c*x^m+d*x^n),x, algorithm="maxima")

[Out]

-(b*c - a*d)*integrate(x^m/(c*d*x^m + d^2*x^n), x) + b*x/d

________________________________________________________________________________________

Fricas [F]  time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left (\frac{a x^{m} + b x^{n}}{c x^{m} + d x^{n}}, x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a*x^m+b*x^n)/(c*x^m+d*x^n),x, algorithm="fricas")

[Out]

integral((a*x^m + b*x^n)/(c*x^m + d*x^n), x)

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{a x^{m} + b x^{n}}{c x^{m} + d x^{n}}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a*x**m+b*x**n)/(c*x**m+d*x**n),x)

[Out]

Integral((a*x**m + b*x**n)/(c*x**m + d*x**n), x)

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{a x^{m} + b x^{n}}{c x^{m} + d x^{n}}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a*x^m+b*x^n)/(c*x^m+d*x^n),x, algorithm="giac")

[Out]

integrate((a*x^m + b*x^n)/(c*x^m + d*x^n), x)